import { http } from "@/utils/http";

type Result = {
  success: boolean;
  data: Array<any>;
};

export const getAsyncRoutes = () => {
  return Promise.resolve({
    data: [
      {
        path: "/permission",
        meta: {
          title: "权限管理",
          icon: "lollipop",
          rank: 10,
          showLink: false
        },
        children: [
          {
            path: "/permission/page/index",
            name: "PermissionPage",
            meta: {
              title: "页面权限",
              roles: ["admin", "common"]
            }
          }
        ]
      }
    ]
  });
  // return http.request<Result>("get", "/getAsyncRoutes");
};
